﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_CM_AddContact]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_CM_AddContact];
GO
CREATE PROCEDURE [dbo].[sproc_CM_AddContact]
@clientid int,
@MarketmanID int,
@UpdateTime datetime,
@ContactTime datetime,
@CurStatus nvarchar(100),
@ContactTimes int,
@ContactAim nvarchar(500),
@SellMoney int,
@BargainPrognosis nvarchar(50),
@ContactType nvarchar(50),
@Fee int,
@FeeUsed nvarchar(100),
@ContactContent nvarchar(1000),
@NextContactAim nvarchar(1000),
@NextContactTime datetime

AS

    INSERT INTO UDS_CM_ClientContact(ClientID,MarketmanID,UpdateTime,ContactTimes,ContactAim,SellMoney,BargainPrognosis,ContactType,Fee,ContactContent,NextContactAim,NextContactTime,FeeUsed,CurStatus,ContactTime)
    VALUES(@clientid,@MarketmanID,@UpdateTime,@ContactTimes,@ContactAim,@SellMoney,@BargainPrognosis,@ContactType,@Fee,@ContactContent,@NextContactAim,@NextContactTime,@FeeUsed,@CurStatus,@ContactTime)
    RETURN @@IDENTITY